package com.ruoyi.user.controller;

import cn.dev33.satoken.annotation.SaCheckPermission;
import com.ruoyi.user.service.ApUserService;
import com.ruoyi.user.dtos.LoginDto;
import com.ruoyi.common.dtos.ResponseResult;
import org.apache.http.HttpResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpRequest;
import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.http.server.reactive.ServerHttpResponse;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.net.URI;
import java.util.Collection;

@RestController
@RequestMapping("/api/v1/login")
public class ApUserLoginController {

    @Autowired
    private ApUserService apUserService;


    @PostMapping("/login_auth")
    public ResponseResult login(@RequestBody LoginDto dto) {

        return apUserService.login(dto);
    }
}
